﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace XFPPT.NET.Models
{
    using System.Collections.Generic;

    /// <summary>
    /// 创建PPT大纲请求类
    /// Request class for creating PPT outline
    /// </summary>
    public class CreatePptByOutlineRequest
    {
        /// <summary>
        /// 创建PPT大纲请求类
        /// Request class for creating PPT outline
        /// </summary>
        public CreatePptByOutlineRequest() { }

        /// <summary>
        /// 创建PPT大纲请求类
        /// Request class for creating PPT outline
        /// </summary>
        /// <param name="query"></param>
        /// <param name="createPptByOutlineOutline"></param>
        public CreatePptByOutlineRequest(string query, CreatePptByOutlineOutline createPptByOutlineOutline)
        {
            this.query = query;
            this.outline = createPptByOutlineOutline;
        }
        /// <summary>
        /// 用户生成PPT要求（最多8000字），注意：query不能为空字符串、仅包含空格的字符串
        /// User requirements for generating PPT (maximum 8000 characters). Note: query cannot be an empty string or a string containing only spaces.
        /// </summary>
        public string? query { get; set; }

        /// <summary>
        /// 已生成大纲后，响应返回的请求大纲唯一id （见 3.4 小节返回字段data.sid）
        /// The unique ID of the requested outline returned in the response after the outline has been generated (see the field data.sid in section 3.4).
        /// </summary>
        public string? outlineSid { get; set; }

        /// <summary>
        /// 大纲内容（不得超过20个一级大纲--outline.chapters[].chapterTitle，见 3.4 小节返回字段data.outline）
        /// Outline content (no more than 20 top - level outlines -- outline.chapters[].chapterTitle, see the field data.outline in section 3.4).
        /// </summary>
        public CreatePptByOutlineOutline? outline { get; set; } = new CreatePptByOutlineOutline();

        /// <summary>
        /// 直接供用户检索模板的ID,从PPT主题列表查询中获取；见 1.5 小节返回字段templateIndexId；为空的话，从free模板中随机取一个
        /// The ID directly for users to search for templates, obtained from the PPT theme list query; see the field templateIndexId in section 1.5. If it is empty, a template will be randomly selected from the free templates.
        /// </summary>
        public string? templateId { get; set; }

        /// <summary>
        /// 业务ID（非必传）- 业务方自行决定是否使用
        /// Business ID (not required) - The business party decides whether to use it or not.
        /// </summary>
        public string? businessId { get; set; }

        /// <summary>
        /// PPT作者名：用户自行选择是否设置作者名，默认值为讯飞智文
        /// PPT author name: Users can choose whether to set the author name or not. The default value is "讯飞智文".
        /// </summary>
        public string? author { get; set; }

        /// <summary>
        /// 是否生成PPT演讲备注，默认值为false
        /// Whether to generate PPT speech notes. The default value is false.
        /// </summary>
        public bool? isCardNote { get; set; }

        /// <summary>
        /// 是否联网搜索，默认值为false
        /// Whether to search online. The default value is false.
        /// </summary>
        public bool? search { get; set; }

        /// <summary>
        /// 语种（保证传入大纲语种与输入PPT语种一致），默认值为cn
        /// Language (ensure that the language of the input outline is consistent with the language of the input PPT). The default value is "cn".
        /// </summary>
        public string? language { get; set; }

        /// <summary>
        /// 文件地址
        /// File address
        /// </summary>
        public string? fileUrl { get; set; }

        /// <summary>
        /// 文件名(带文件名后缀) ，传fileUrl的话必填
        /// File name (with file name suffix). It is required if fileUrl is provided.
        /// </summary>
        public string? fileName { get; set; }

        /// <summary>
        /// 是否自动配图，默认值为false
        /// Whether to automatically match pictures. The default value is false.
        /// </summary>
        public bool? isFigure { get; set; } = false;

        /// <summary>
        /// ai配图类型： normal、advanced （isFigure为true的话生效）； normal-普通配图，20%正文配图；advanced-高级配图，50%正文配图
        /// AI picture matching type: normal, advanced (effective when isFigure is true); normal - ordinary picture matching, 20% of the text is配图; advanced - advanced picture matching, 50% of the text is配图.
        /// </summary>
        public string? aiImage { get; set; }
    }

    /// <summary>
    /// 创建PPT大纲的大纲信息类
    /// Outline information class for creating PPT outline
    /// </summary>
    public class CreatePptByOutlineOutline
    {
        /// <summary>
        /// 大纲标题
        /// Outline title
        /// </summary>
        public string? title { get; set; }

        /// <summary>
        /// 大纲副标题
        /// Outline subtitle
        /// </summary>
        public string? subTitle { get; set; }

        /// <summary>
        /// 大纲章节列表
        /// List of outline chapters
        /// </summary>
        public List<CreatePptByOutlineChapter>? chapters { get; set; } = new List<CreatePptByOutlineChapter>();
    }

    /// <summary>
    /// 创建PPT大纲的章节信息类
    /// Chapter information class for creating PPT outline
    /// </summary>
    public class CreatePptByOutlineChapter
    {
        /// <summary>
        /// 章节标题
        /// Chapter title
        /// </summary>
        public string? chapterTitle { get; set; }

        /// <summary>
        /// 章节内容列表，二级大纲时应为 null
        /// </summary>
        public List<CreatePptByOutlineChapter>? chapterContents { get; set; } = null;
    }
}
